import request from '@/utils/request'

export function login(data:Object) {
    // return request({
    //   url: '/vue-admin-template/user/login',
    //   method: 'post',
    //   data
    // })
    return request.post('admin/login', data)
  // return request.get('', data)
}

export function getRoutes(data:any) {
    return request.get('admin/path', { params: data })
}
export function getList(token:any) {
  return request({
    url: '/admin/list',
    method: 'get',
    params: { token }
  })
}
export function getInfo(token:any) {
    return request({
        url: '/vue-admin-template/user/info',
        method: 'get',
        params: { token }
    })
}

export function logout() {
    return request({
        url: '/vue-admin-template/user/logout',
        method: 'post'
    })
}
